home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
fido
/
FQUERY.lha
/
DOCS
/
FQ.doc
next >
Wrap
Text File
|
1995-04-20
|
18KB
|
404 lines
$VER: FQ doc File Query and Search Utility Robert Williamson 00.55.75
FQuery, FQueryM, FQueryP, FQscan, FQCheckList and FQFixList are all
Copyright (C) 1995 Robert Williamson
FQsearch was written for FQuery and is
Copyright (C) 1995 Fredric Morin
KeyFiles are not to be redistributed.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What it does:
In 1991, the msdos program ALLFIX, by Harald Harms,
"introduced the idea of searching for files via echomail.
The term applied to this function is 'FileFind'. The
FileFind system allows BBS USERS to search for files by
placing a message to 'ALLFIX' and wait for a reply.
Each BBS system, running an ALLFIX compatible FileFind
processor, will reply to that user if there any files
matching their requested filespec."
Quote from ALLFIX.DOC v4.20 by Harald Harms
FQuery IS the Complete FileFind system for the Amiga, with ALL the
features of AllFix and many more. FQuery processes echomail messages
addressed to FQuery, FileFind or AllFix and NetMail messages addressed to
FQuery. It examines and parses the subject field for search queries and
netmail commands and posts a response of any matches found.
FQuery is available in versions for either MSG base (FQueryM) or Packet
scanning (FqueryP).
See FQ.readme for list of features and technical compliance.
The FileList:
FQuery expects that file entries in your filelist start in column 2, in
other words, each filename is preceeded with a space. FQuery will treat
ALL text lines that are preceeded with a single space as a file entry. It
will ignore lines that have a character in column 1 or are not description
continuation lines as defined by the DESC_NUM and DESC_COL entries in your
config.
The utility FQCheckList can be used to scan your filelist. It will
output some statistics with which you may determine if your filelist is
compliant with FQuery requirements. It takes as arguments the fullpathname
of your filelist, the start column of the file description and the word
number in the line of the description.
FQCheckList fullpathfilelist DESC_COL DESC_NUM
Another method to test for filelist compliance is to issue the
commands:
SetEnv FQSEARCH DESC_COL-1,DESC_NUM ;use the actual values
;not the variable names
;comma MUST be included
FQsearch FullPathNameOfFileList #? -f ; 'f' MUST be lowercase
The output should display all the file entries from your filelist,
properly formatted.
If your filelist is non-compliant, the utility FQFixList can be
used to attempt to make a compliant one. The arguments are as follows:
FQFixList inputfile outputfile columns offset fancy
columns = number of columns in a file entry
offset = character position where description starts
fancy = characters which appear in col 1 of lines that have
the same number of columns as a file entry
For example:
To convert a Cnet filelist produced by:
TUCFGII v2.5 By Shawn McNeece @1:104/535
FQFixList filelist newfilelist 5 38 +|
The new DESC_COL value will be 39.
To convert an AmiNet Index:
FQFixList index newfilelist 5 42 |
The new DESC_COL value will be 43.
Be SURE to change DESC_COL in FQ.cfg.
Configuration:
Configuration options allow for:
- definition of echotag, echopath, site address, sitename, inport
command and both import and export paths for each echo.
- definition of echo-specific exclusion parameters for message age,
description, filespec and keyword lengths and disallowed keywords
- exclusion of locally generated FQuery messages from processing
- backup of packets created.
- definition of progress window and public screen
- definition of site-specific information to be included in
messages.
- sending ABOUT file via netmail
- sending NEWFILES file via netmail
- sending query response via netmail
in addition, for the packet scanning version of FQuery:
- sites from which to accept packets for scanning
- list of echos to process
- output filename
- list of zones and domains
Usage:
(Both PKT and MSG versions)
FQuery ? Displays FQuery usage.
FQuery SHOW Displays the current configuration.
FQuery REPORT <tagname> Displays an echo configuration report.
FQuery TEST n subject Tests the configuration of echo n and
searchs for the subject specfied.
If n=0, the DEFAULTS will be used.
Displays the list of matches found and
also writes it to T:FQ.result.
EchoMail: (MSG version ONLY)
FQuery SCAN Scans all defined EchoMail message
bases.
FQuery RESCAN n ReScans EchoMail message base defined
by index n.
FQuery REPROC n ReProcesses EchoMail message base defined
by index n.
FQuery nn.MSG n Reprocesses single EchoMail
message file nn in the EchoMail
base defined by index n.
NetMail: (MSG Version ONLY)
FQuery NET fullpathname myaddress
Processes specified netmail message
to the address specified.
FQuery NET fullpathname myaddress RESCAN
REscans specified netmail message
to the address specified.
FQuery NET fullpathname myaddress REPROC
Reprocesses scans the specified netmail
message to the address specified.
Packets:
FQuery LIST output_file_from_FQscan
FQuery parses the subject field of each message for one or more of the
following.
ECHOMAIL SUBJECT line parameters:
% - user request that response be sent via netmail
MUST be followed by a space
keyword - single word preceded by a / with no intervening spaces
keywords will be ignored if thay are shorter than
MINKCHAR
keywords found in IGNORE_KEYS will also be ignored.
description - string enclosed in double-quotes
MUST be more than one word
filename - single word, no spaces, double-quotes or preceding /
filespecs will be ignored if they are shorter than
MINFCHAR.
if an asterix '*' is found in a filename field, it and
all following characters are removed and replaced
internally by Amiga pattern matching.
The configuration for each echo allows defining the minimum number of
characters required for both keywords and filespecs. For both, this value
should NEVER be less than 3.
Designated Reply Echo:
Some echos do not permit filefind programs to post responses, in that
case, the reply may be either posted in the designated filefind echo for
the same FTN (Fidonet Technology Netwrok, such as FidoNET and AmigaNET) or
the filefind echo of ANOTHER FTN, or routed via netmail.
Second Reply:
If a user REPLIES to an FQuery response that indicates there were more
matches found than were posted, a Second Reply will be posted or routed via
netmail with the full match listing. Replies are not processed in
echos which have designated filefind reply echos.
FQuery searchs the defined filelist for matches to each query, and
posts a Fquery Response by writing an echomail PACKET in the defined
INBOUND directory for that echo. If an IMPORT command is defined, FQuery
will execute that command to import it's responses to the defined echomail
TAGNAME.
NETMAIL SUBJECT line parameters:
FQuery also accepts and processes NETMAIL queries that are addressed to
FQuery ONLY. In addition to the above Query formats, FQuery also accepts
the following commands. Please note that no queries will be accepted or
processed if a % command is in the subject field. Only the first % command
is processed,anything following it will be ignored.
%help - netmail only, returns this help text, the ABOUT of the
the site and a list of MAGIC freqable names.
%about - netmail only, returns the ABOUT of the site and a full
%magic list of MAGIC names.
%newfiles - netmail only, returns the NEWFILES list of the site
%new via netmail.
%report <tagname>
- sends a configuration report for echo <tagname>
FQuery posts a netmail Response by writing either a 4D or 5D echomail
OUT packet file in the defined outbound directory. It is the sysop's
responsibilty to pack/route or crash the response.
Packet Scanning:
FQscan is a utility that scan EchoMail packets for messages to any
configured FileFind program name. FQscan creates an output file containing
all pertainent information from such messages (tagname, from, to, subject,
date, origin address, msgid, fmpt etc) in any of the configured echos or in
netmail. Only packets from sites defined in FQ.cfg will be scanned.
Packets many be scanned before importing, or alternativly,if one backs up
inbound mail, after importing. The FQscan output file is always opened in
append mode if it exists, therefore, one can call FQuery LIST via a cron
event once a day. FQuery deletes FQscan's output file when it has
completed processing it.
Since FQscan is limited to sites that you configure, NetMail scanning
would be limited to only those netmail messages found in packets from
configured sites. IF the scanned packet contains NetMail messages to FQuery,
they will be included in the output file, unless you set NONETSCAN to TRUE
in FQ.cfg. In order to be able to process ALL netmail messages to FQuery,
you must make other arrangments to scan your NetMail. This limitation
applies only to the PKT version of FQuery,
In my OWN setup, I use FQueryP with NONETSCAN set TRUE and my NetMGR
calls FQUERYM to handle netmail queries.
FQscan has been found to be faster than PktDump 1.10, by Charles
Conlow (which I consider to be _the_ benchmark for both packet compliance
and scanning) even though it does more (ie, parseing fields, finding
address in Originline etc..).
The format of FQscan's output file is as follows:
tagname|toname|fromname|subject|msgdate|morg|msgid|fmpt
Each field is separated by a '|' character.
Description of fields:
tagname - the Area: tagname of the echo
should be set to NETMAIL if a netmail message.
toname - the full text of the To: field of the message
fromname - the full text of the From: field of the message
subject - the full text of the Subject: field of the message
msgdate - the full text of the creation date field of the message
morg - the address listed in the Origin: line if an echomail message
or the origin address in the INTL: line if a NetMail message
msgid - the full text following the MSGID: line, if found
fmpt - the full text following the FMPT line, if found
(applies to netmail only)
Any item not found is left blank.
If both morg and msgid are blank, a netmail response is not possible.
The example script, ScanPkts, demonstrates one method of scanning
backed-up packets. It is left up to the user exactly how he will scan
packets, but here are a few suggestions:
1 - If inbound packets are backed up, use the script ScanPkts as a
DAILY cron event at 11:58.
ScanPkts:
; MBACK:inhold is MY inbound packet backup directory,
list MBACK:INHOLD/#?.PKT SINCE TODAY LFORMAT "rx mail:rexx/fqscan %s%s"
TO T:fqscan.cmd
execute T:fqscan.cmd
delete T:fqscan.cmd
IF EXISTS log:fqlist ; name of output file in FQscan.cfg
FQUERYP LIST LOG:FQLIST
ENDIF
2 - Export the echos to scan to an unused point, copying these packets
to a special directory where they can be scanned by FQscan. Make sure to
delete these packets after scanning.
3 - Your tosser may have its own message filter. If it can duplicate
the output listed above, use it.
The example script, ScanPkts, demonstrates one method of scanning
backed-up packets.
EchoMail Message Scanning:
SCAN is defined to mean that the message has been examined to see if it
is addressed to ALLFIX, FILEFIND, FILEQUERY or FQUERY.
PROC is defined to mean that such a message has been processed.
FQuery marks a MSG in two ways.
Firstly; to indicate that it has been scanned, the PURE bit of the msg
FILE attributes is set as the SCAN flag.
Secondly; to indicate it has been processed, the normally unused bit 10
of the MSG attributes is set as the PROC flag.
After scanning, the RECD attribute of the MSG is also set.
FQuery sorts MSGs in reverse order to find the highest message in the
echobase. It scans the message in reverse order, checking the pure bit
(SCANNED). If RESCAN is not enabled, FQuery will stop processed the echo
base when it encounters an already scanned messaage. If the message has
not been scanned, FQuery then checks if the message is a file query and the
PROC flag has not been set. If REPROC is enabled, the PROC flag is
ingnored and the message is re-processed.
Query Processing:
FQuery uses the defined fileslist and the standard AmigaDos command
Search, for the processing of all search queries.
If an optional freqlist is defined, that list will be used for FILESPEC
queries. A freq list is NOT a requirement for any compliant FileFind
program. If the optional freqlist is defined, FQuery uses the fast
freqlister searcher FSearch by Frederic Morin (FSearch is also used by RFS,
RFH. MRFH and TRFH freq handlers and a number of other utilities). FQuery
obtains the actual size, date and description of matched files from the
filenote. It then formats and wordwraps the response message.
Response Message:
In order to meet both the rules of the various search echos and
limitations of various msdos tossers, FQuery places some limitations on its
respose messages.
If the list of matches is greater than the maximum bytes permitted for
a matchlist in the echo (max:60k), Fquery will post a message to the user
to indicate that his query may have been too ambiguous and inviting him to
freq or DL the MAGIC name FILES for a full list.
If the list of matches is greater than the defined matchlist per
message for the echo, it will be split into multiple messages. Each will
have a "Part n/n" text added. The subsequent messages will not include the
ABOUT info of the site. This prevents the subsequent messages from being
considered as Dupes by sites running header crc dupe checkers.
If the number of messages is greater than the maximum postable messages
per query for the echo, and NETRESPONSE has been enabled, they will be sent
as NetMail, otherwise the user will be informed that his request may have
been too amibiguous.
If the site's ABOUT file is greater than the maximum system header
lines for the echo, the remainder will NOT be posted. A note will be added
to the response indicated this, and the user will be either invited to Freq
or DL the MAGIC name MAGIC, for a full list of magic names. If NETABOUT
has been enabled, the full ABOUT file will be sent by routed netmail.
The above limitations do not apply to NetMail queries.
When a response is split into multiple messages, each message is given
both a unique Subject field and a unique MSGID:. This because some tossers
may use either or both for dupe detection.
Bugs:
Bugs may become evident if your config differs from mine as shown in
MyShowCfg. Please let me know as soon as possible.
Credits:
FQueryM, FQueryP, FQscan, FQCheckList adn FQFixList are written in
ARexx and require no additional libraries, except when compiled. They are
coded is such a manner as to be compilable (except for FQScan) with
RexxPlus without error or warnings, except where such errors are generated
by the user during installation.
FQuery and FQscan were developed by Robert Williamson and are based
upon parts of NetMGR, AreaMGR, Smsg, Write_PKT, FTNsort, ScanPKT and other
tools by the same author. Those tools may have credits listing other
authors who provided inspiration, code examples or other input.
Fsearch and FQsearch were designed by Robert Williamson and coded in c
by Fredric Morin.